import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  //第二套路由
  // {
  //    path:'/',
  //    name:'Structure',
  //    component:()=>import('../views/structure/Structure.vue')
  // },
  // {
  //   path:'/dataquery',
  //   name:"Dataquery",
  //   component:()=>import('../views/structure/Dataquery.vue')
  // },
  // {
  //   path:'/ran_time',
  //   name:"Ran_time",
  //   component:()=>import('../views/structure/Ran_time.vue')
  // },

  // {
  //   path: '/function_statis',
  //   name:"/function_statis",
  //   component: () => import('../views/function/statis/Function_statis.vue'),
  //   meta: {
  //     title: '产能统计'
  //   }
  // },
  // {
  //   path: '/function_produce',
  //   name:"/function_produce",
  //   component: () => import('../views/function/produce/Function_produce.vue'),
  //     meta: {
  //       title: "单一产品缺陷分析"
  //     },
  // },
  // {
  //   path: '/function_table',
  //   name:"/function_table",
  //   component: () => import('../views/function/table/Function_table.vue'),
  // },
  // {
  //   path: '/function_serch',
  //   name:'/function_serch',
  //   component: () => import('../views/function/detection/Function_serch.vue'),
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: "产品履历查询"
  //       }
  //     }
  //   ]
  // },
  // {
  //   path: '/function_drawback',
  //   name:"/function_drawback",
  //   component: () => import('../views/function/drawback/Function_drawback.vue'),
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: "缺陷密集性分析"
  //       }
  //     }
  //   ]
  // },
  // {
  //   path: '/function_facility',
  //   component: () => import('../views/function/facity/Function_facility.vue'),
  //   name:"/function_facility",
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: '设备密集性分析'
  //       }
  //     }
  //   ]
  // },
  // {
  //   path:'/function_staff',
  //   name:"function_staff",
  //   component: () => import('../views/function/staff/Function_staff.vue'),
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: '复判人员密集性分析'
  //       }
  //     }
  //   ]
  // },
  // {
  //   path:'/function_capacity',
  //   name:"function_capacity",
  //   component: () => import('../views/function/acpacity/Function_capacity.vue'),
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: '缺陷对比分析'
  //       }
  //     }
  //   ]
  // },
  // {
  //   path:'/function_glo',
  //   component: () => import('../views/function/glo/Function_glo.vue'),
  //   name:"function_glo",
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: '产能对比分析'
  //       }
  //     }
  //   ]
  // },
  // {
  //   path:'/function_query',
  //   component: () => import('../views/function/aquery/Function_query.vue'),
  //   name:"function_query",
  //   children: [
  //     {
  //       path: '/',
  //       meta: {
  //         title: '复判人员产能统计'
  //       }
  //     }
  //   ]
  // },


  // {
  //   path: '/home',
  //   name: 'Home',
  //   component: Home,
  //   children: [
  //     {
  //       path: '/',
  //       component: () => import('../views/Home_cont.vue'),
  //       meta:{
  //         title:"首页"
  //       }
  //     }
  //   ]
  // },






   //第一套路由

  {
    path:"/",
    name:"Login",
    component: () => import('../views/login/Login.vue'),
  },


  //查询选项页面
  {
    path: '/Home',
    name: 'Home',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/Home_cont.vue'),
        meta:{
          title:"首页"
        }
      }
    ]
  },
 
  {
    path: '/function_table',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/table/Function_table.vue'),
        meta: {
          title: "缺陷查询统计",
          keepAlive:true
        }
      }
    ]
  },
  {
    path: '/function_serch',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/detection/Function_serch.vue'),
        meta: {
          title: "产品履历查询"
        }
      }
    ]
  },
  {
    path: '/function_produce',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/produce/Function_produce.vue'),
        meta: {
          title: "单一产品缺陷分析"
        }
      }
    ]
  },
  {
    path: '/function_drawback',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/drawback/Function_drawback.vue'),
        meta: {
          title: "缺陷密集性分析",
          keepAlive:true

        }
      }
    ]
  },
  
  {
    path: '/function_statis',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/statis/Function_statis.vue'),
        meta: {
          title: '产能统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path: '/function_facility',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/facity/Function_facility.vue'),
        meta: {
          title: '设备密集性分析',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/function_staff',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/staff/Function_staff.vue'),
        meta: {
          title: '复判人员效能统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/function_capacity',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/acpacity/Function_capacity.vue'),
        meta: {
          title: '缺陷对比分析',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/function_glo',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/glo/Function_glo.vue'),
        meta: {
          title: '产能对比分析',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/function_query',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/aquery/Function_query.vue'),
        meta: {
          title: '复判人员密集性统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/Equcheck',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/equcheck/Equcheck.vue'),
        meta: {
          title: '设备过漏检验统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/Equipcavity',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/Equipcavity/Equipcavity.vue'),
        meta: {
          title: '设备腔体统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/Defectsback',
    component: Home,
    children: [
      {
        path: '/',
        component: () => import('../views/function/Defectsback/Defectsback.vue'),
        meta: {
          title: '缺陷回溯统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/activation',
    component: Home,
    children: [
      {
        path: '/Activation',
        component: () => import('../views/function/activation/Activation.vue'),
        meta: {
          title: '稼动率 TT统计',
          keepAlive:true
        }
      }
    ]
  },
  {
    path:'/Staffleak',
    component: Home,
    children: [
      {
        path: '/Staffleak',
        component: () => import('../views/function/staffleak/Staffleak.vue'),
        meta: {
          title: '人员漏检统计',
          keepAlive:true
        }
      }
    ]
  },

  
  {
    path:"/Unittrend",
    component: Home,
    children:[
       {
        path:"/",
        component:()=>import('../views/function/unittrend/Unittrend.vue'),
        meta: {
          title: '设备过漏检趋势',
          keepAlive:true
        }
       }
    ]
  
  },
  {
    path:'/Warningrecord',
    component: Home,
    children: [
      {
        path: '/Warningrecord',
        component: () => import('../views/function/Warningrecord/Warningrecord.vue'),
        meta: {
          title: '预警记录'
        }
      }
    ]
  },

   ///人员信息点击跳转
   {
     path:"/itemDow",
     name:"ItemDow",
     component:()=>import('../views/function/aquery/ItemDow.vue')
   },


   //  配置页面
   {
    path:'/Allocationform',
    component: Home,
    children: [
      {
        path: '/allocationform',
        component: () => import('../views/allocation/Allocationform.vue'),
        meta: {
          title: '机种设置'
        }
      }
    ]
   },
   {
    path:'/Defeation',
    component: Home,
    children: [
      {
        path: '/defeation',
        component: () => import('../views/allocation/Defeation.vue'),
        meta: {
          title: '缺陷设置'
        }
      }
    ]
   },
   {
    path:'/Staffing',
    component: Home,
    children: [
      {
        path: '/staffing',
        component: () => import('../views/allocation/Staffing.vue'),
        meta: {
          title: '人员设置'
        }
      }
    ]
   },
   {
    path:'/Userprofile',
    component: Home,
    children: [
      {
        path: '/userprofile',
        component: () => import('../views/allocation/Userprofile.vue'),
        meta: {
          title: '用户设置'
        }
      }
    ]
   },  
   {
    path:'/Facilitydeploy',
    component: Home,
    children: [
      {
        path: '/Facilitydeploy',
        component: () => import('../views/allocation/Facilitydeploy.vue'),
        meta: {
          title: '设备设置'
        }
      }
    ]
   },
   {
    path:'/Warningpeople',
    component: Home,
    children: [
      {
        path: '/Warningpeople',
        component: () => import('../views/allocation/Warningpeople.vue'),
        meta: {
          title: '预警人员设置'
        }
      }
    ]
   },
   {
    path:'/WarningID',
    component: Home,
    children: [
      {
        path: '/WarningID',
        component: () => import('../views/allocation/WarningID.vue'),
        meta: {
          title: '预警ID设置'
        }
      }
    ]
   },
   {
    path:'/Warningconfig',
    component: Home,
    children: [
      {
        path: '/Warningconfig',
        component: () => import('../views/allocation/Warningconfig.vue'),
        meta: {
          title: '预警设置'
        }
      }
    ]
   },
   {
    path:'/Alertsubscription',
    component: Home,
    children: [
      {
        path: '/Alertsubscription',
        component: () => import('../views/allocation/Alertsubscription.vue'),
        meta: {
          title: '预警订阅设置'
        }
      }
    ]
   },

   
  


      ///预警页面
  {
    path:'/function_warning',
    name:'function_warning',
    component: () => import('../views/function/warning/Function_warning.vue'),
    // component: Home,
    // children: [
    //   {
    //     path: '/',
    //     meta: {
    //       title: '连续预警'
    //     }
    //   }
    // ]
  },
  {
    path:"/function_imgwarning",
    name:"function_imgwarning",
    component: () => import('../views/function/Imgwranig/Function_imgwarning.vue'),
    // component:Home,
    // children:[
    //   {
    //     path: '/',
    //     meta: {
    //       title: '连续图像预警'
    //     }
    //   }
    // ]
  },


  /////实时看板系列
  {
    
    path:'/real-time',
    name:"Real-time",
    component:()=>import('../views/function/Real-time/Real-time.vue')
  },
  {
    path:'/real-time2',
    name:"Real-time2",
    component:()=>import('../views/function/Real-time2/Real-time2.vue')

  },
  {
    path:'/Defectsduty',
    name:"Defectsduty",
    component:()=>import('../views/function/Defectsduty/Defectsduty.vue')
  },
  {
    path:'/Staffciency',
    name:"Staffciency",
    component:()=>import('../views/function/Staffciency/Staffciency.vue')
  },

  {
     path:'/ren_item',
     name:"Ren_item",
     component:()=>import('../views/function/ren_item/Ren_item.vue')
  },

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path:'/Earlywarning',
    name:"Earlywarning",
    component:() =>import('../views/function/earlywarning/Earlywarning.vue')
  }
]

const router = new VueRouter({
  // mode: 'hash',
    //  mode:"history",
  // base: process.env.BASE_URL,
  routes
})

export default router
